<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div class="bjui-pageContent">
    <form action="${ctx}/sys/sysUserAction/doSave" class="pageForm" data-toggle="validate">
        <input type="hidden" name="id" id="j_dialog_id" value="${user.id}">
        <input type="hidden" name="op" id="j_dialog_op" value="${param.op}${op}">
        <c:if test="${!empty user}">
        <input type="hidden" name="createDate" id="j_dialog_createDate" value="${user.createDate}" />
		<input type="hidden" name="createUser" id="j_dialog_createUser" value="${user.createUser}"/>
		<input type="hidden" name="status" id="j_dialog_status" value="${user.status}"/>
		</c:if>
        <table class="table table-condensed table-hover">
            <tbody>
                <tr>
                    <td colspan="2" align="center" valign="middle"><h4>${title}</h4></td>
                </tr>
                <tr>
                	<td>
                        <label for="account" class="control-label x90">帐号：</label>
                        <input type="text" name="account" id="account" value="${user.account}" data-rule="required;account;remote[${ctx}/sys/sysUserAction/doAccountValidate?op=${op}&original=${user.account}]" size="20">
                    </td>
                    <td>
                        <label for="password" class="control-label x85">密码：</label>
                        <input type="password" name="password" id="password" value="${user.password}" data-rule="required;required" size="20">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_dialog_name" class="control-label x90">姓名：</label>
                        <input type="text" name="name" id="j_dialog_name" value="${user.name}" data-rule="required;required" size="20">
                    </td>
                    <td>
                        <label for="j_dialog_email" class="control-label x85">邮箱：</label>
                        <input type="text" name="email" id="j_dialog_email" value="${user.email}" data-rule="required;email" size="20">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_dialog_tel" class="control-label x90">电话：</label>
                        <input type="text" name="telephone" id="j_dialog_tel" value="${user.telephone}" data-rule="required;mobile" size="20">
                    </td>
                    <td>
                   		<label for="j_dialog_post_id" class="control-label x90">岗位：</label>
                        <select id="j_dialog_post_id" name="postId" data-toggle="selectpicker">
                        	<c:forEach items="${post}"  var="p">
                        		<c:choose>
                        			<c:when test="${user.postId==p.id}">
                        				<option value="${p.id}" selected="selected">${p.postName}</option>
                        			</c:when>
                        			<c:otherwise>
                        				<option value="${p.id}" >${p.postName}</option>
                        			</c:otherwise>
                        		</c:choose>
                        		
                        	</c:forEach>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <label for="j_dialog_description" class="control-label x90">描述：</label>
                        <textarea name="description" id="j_dialog_description" rows="5" cols="58">${user.description}</textarea>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
    </ul>
</div>